package io;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.util.Scanner;

/*
简单的记事工具
 */
public class TestNote {
    public static void main(String[] args) throws IOException {
        Scanner scan=new Scanner(System.in);
        FileOutputStream fos=new FileOutputStream("ddd.txt");
        System.out.println("请输入正确的数据，输入到ddd时结束");
        while (true){
            String lien=scan.nextLine();
            if ("ddd".equals(lien)){
                break;
            }
            fos.write(lien.getBytes(StandardCharsets.UTF_8));
        }
        System.out.println("OK,结束");
        fos.close();
    }
}
